/**
 * Created by LeungZ on 2016/9/6.
 */
import './cluster.scss';
import temp from './cluster.html';
import ctrl from './cluster.ctrl.js';

export default angular.module('ctg-k8sconsole').config(['$stateProvider', $stateProvider=> {
    $stateProvider.state('k8s', {
        url: '/k8s',
        templateUrl: temp,
        controller: ctrl,
        controllerAs: 'list',
        resolve: {
            list: ['clusterSrv', 'ctgNotification', function (clusterSrv, ctgNotification) {
                return clusterSrv.getClusterList({perPage: 99, currentPage: 1}).catch(function (data) {
                    ctgNotification.error('获取容器集群列表数据有误.');
                });
            }]
        }
    })
}]);